<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>A canvas fontFamily example</title>
 
    <script type="text/xaml" id="xaml"><?xml version="1.0"?>
      <Canvas xmlns="http://schemas.microsoft.com/client/2007"></Canvas></script>
<script type="text/javascript" src="../uupaa-excanvas.js"></script>
 
    <script>
// UTF-8で保存すること
window.onload = function() {
  var layer1 = new uuCanvas.Layer(document.getElementById("view1"), 500, 3500);
  var layer2 = new uuCanvas.Layer(document.getElementById("view2"), 500, 3500);
  var layer3 = new uuCanvas.Layer(document.getElementById("view3"), 500, 3500);
  layer1.addCanvas("a").setFill("blue").show();
  layer2.addVMLCanvas("a").setFill("green").show();
  layer3.addCanvas("a").setFill("blue").addVMLCanvas("b").setFill("green").show();

  uuCanvas.ready(function() {
    draw(layer1);
    draw(layer2);
    draw(layer3.push("a"));
    draw(layer3.push("b"));
  });
};
function draw(layer) {
  var y = 10;
  layer.
     set({ font: "24pt Arial"                 }).text("24pt Arial", 10, y += 50).
     set({ font: "24pt 'Arial Black'"         }).text("24pt 'Arial Black'", 10, y += 50).
     set({ font: "24pt 'Comic Sans MS'"       }).text("24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "24pt 'Courier New'"         }).text("24pt 'Courier New'", 10, y += 50).
     set({ font: "24pt Georgia"               }).text("24pt Georgia", 10, y += 50).
     set({ font: "24pt 'Lucida Grande'"       }).text("24pt 'Lucida Grande'", 10, y += 50).
     set({ font: "24pt 'Lucida Sans Unicode'" }).text("24pt 'Lucida Sans Unicode'", 10, y += 50).
     set({ font: "24pt 'Times New Roman'"     }).text("24pt 'Times New Roman'", 10, y += 50).
     set({ font: "24pt 'Trebuchet MS'"        }).text("24pt 'Trebuchet MS'", 10, y += 50).
     set({ font: "24pt Verdana"               }).text("24pt Verdana", 10, y += 50).
     set({ font: "24pt 'MS UI Gothic'"        }).text("24pt 'MS UI Gothic'", 10, y += 50).
     set({ font: "24pt 'MS PGothic'"          }).text("24pt 'MS PGothic'", 10, y += 50).
     set({ font: "24pt 'Meiryo'"              }).text("24pt 'Meiryo'[メイリオ]", 10, y += 50).
     set({ font: "24pt sans-serif"            }).text("24pt sans-serif", 10, y += 50).
     set({ font: "24pt serif"                 }).text("24pt serif", 10, y += 50).
     set({ font: "24pt monospace"             }).text("24pt monospace", 10, y += 50).
     set({ font: "24pt fantasy"               }).text("24pt fantasy", 10, y += 50).
     set({ font: "24pt cursive"               }).text("24pt cursive", 10, y += 50).
     set({ font: "24pt IPAMincho"             }).text("24pt IPAMincho", 10, y += 50).
     set({ font: "24pt IPAPMincho"            }).text("24pt IPAPMincho", 10, y += 50).
     set({ font: "24pt IPAGothic"             }).text("24pt IPAGothic", 10, y += 50).
     set({ font: "24pt IPAPGothic"            }).text("24pt IPAPGothic", 10, y += 50).
     set({ font: "24pt IPAUIGothic"           }).text("24pt IPAUIGothic", 10, y += 50).
     set({ font: "italic 24pt Arial"              }).text("italic 24pt Arial", 10, y += 50).
     set({ font: "italic 24pt 'Arial Black'"      }).text("italic 24pt 'Arial Black'", 10, y += 50).
     set({ font: "italic 24pt 'Comic Sans MS'"    }).text("italic 24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "italic 24pt 'Courier New'"      }).text("italic 24pt 'Courier New'", 10, y += 50).
     set({ font: "oblique 24pt Arial"             }).text("oblique 24pt Arial", 10, y += 50).
     set({ font: "oblique 24pt 'Arial Black'"     }).text("oblique 24pt 'Arial Black'", 10, y += 50).
     set({ font: "oblique 24pt 'Comic Sans MS'"   }).text("oblique 24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "oblique 24pt 'Courier New'"     }).text("oblique 24pt 'Courier New'", 10, y += 50).
     set({ font: "italic small-caps 24pt 'Lucida Grande'"       }).text("italic small-caps 24pt 'Lucida Grande'", 10, y += 50).
     set({ font: "italic normal bolder 24pt 'Lucida Sans Unicode'" }).text("italic normal bolder 24pt 'Lucida Sans Unicode'", 10, y += 50).
     set({ font: "italic normal bold 24pt 'Times New Roman'"    }).text("italic normal bold 24pt 'Times New Roman'", 10, y += 50).
     set({ font: "italic normal lighter 24pt 'Trebuchet MS'"    }).text("italic normal lighter 24pt 'Trebuchet MS'", 10, y += 50).
     set({ font: "normal normal 100 16pt Verdana"               }).text("normal normal 100 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 200 16pt Verdana"               }).text("normal normal 200 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 300 16pt Verdana"               }).text("normal normal 300 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 400 16pt Verdana"               }).text("normal normal 400 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 500 16pt Verdana"               }).text("normal normal 500 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 600 16pt Verdana"               }).text("normal normal 600 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 700 16pt Verdana"               }).text("normal normal 700 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 800 16pt Verdana"               }).text("normal normal 800 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 900 16pt Verdana"               }).text("normal normal 900 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 400 xx-small Helvetica"         }).text("normal normal 400 xx-small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 x-small Helvetica"          }).text("normal normal 400 x-small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 small Helvetica"            }).text("normal normal 400 small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 smaller Helvetica"          }).text("normal normal 400 smaller Helvetica", 10, y += 50).
     set({ font: "normal normal 400 medium Helvetica"           }).text("normal normal 400 medium Helvetica", 10, y += 50).
     set({ font: "normal normal 400 larger Helvetica"           }).text("normal normal 400 larger Helvetica", 10, y += 50).
     set({ font: "normal normal 400 large Helvetica"            }).text("normal normal 400 large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 x-large Helvetica"          }).text("normal normal 400 x-large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 xx-large Helvetica"         }).text("normal normal 400 xx-large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 20px Helvetica"             }).text("normal normal 400 20px Helvetica", 10, y += 50).
     set({ font: "normal normal 400 18pt Helvetica"             }).text("normal normal 400 18pt Helvetica", 10, y += 50).
     set({ font: "normal normal 400 2em Helvetica"              }).text("normal normal 400 2em Helvetica", 10, y += 50).
     set({ font: "24pt 'HiraKakuPro-W3'"      }).text("24pt 'HiraKakuPro-W3'", 10, y += 50).
     set({ font: "24pt impact"                }).text("24pt impact", 10, y += 50).
     set({ font: "24pt hoge,'Meiryo'"         }).text("24pt hoge,'Meiryo'   [メイリオ]", 10, y += 50).
     set({ font: "24pt hoge,impact"           }).text("24pt hoge,impact", 10, y += 50).
     set({ font: "24pt Helvetica"             }).text('HTML ENTITY TEST. A&B&"C"', 10, y += 50).
     set({ font: "20px Helvetica"             }).text('20px Helvetica', 10, y += 50).
     set({ font: "10em Helvetica"             }).text('10em Helvetica', 10, y += 50);
}
    </script>
    <style type="text/css">
      body { margin: 20px; font-family: arial,verdana,Helvetica; background: #fff;}
      h1 { font-size: 140%; font-weight:normal; color: #036; border-bottom: 1px solid #ccc; }
      canvas { border: 2px solid #000; float: left; margin-right: 20px; margin-bottom: 20px; }
      pre { float:left; display:block; background: rgb(238,238,238); border: 1px dashed #666; padding: 15px 20px; margin: 0 0 10px 0; }
    </style>
  </head>
  <body>
    <h1>A canvas <code>fontFamily</code> example</h1>
    <div>
      <table>
      <tr><td><div id="view1"></div></td><td><div id="view2"></div></td><td><div id="view3"></div></td></tr>
      </table>
      <pre>
&lt;div id="view1"&gt;&lt;/div&gt;
&lt;div id="view2"&gt;&lt;/div&gt;
&lt;div id="view3"&gt;&lt;/div&gt;

window.onload = function() {
  var layer1 = new uuCanvas.Layer(document.getElementById("view1"), 500, 3500);
  var layer2 = new uuCanvas.Layer(document.getElementById("view2"), 500, 3500);
  var layer3 = new uuCanvas.Layer(document.getElementById("view3"), 500, 3500);
  layer1.addCanvas("a").setFill("blue").show();
  layer2.addVMLCanvas("a").setFill("green").show();
  layer3.addCanvas("a").setFill("blue").addVMLCanvas("b").setFill("green").show();

  uuCanvas.ready(function() {
    draw(layer1.curt("a"));
    draw(layer2.curt("a"));
    draw(layer3.curt("a"));
    draw(layer3.curt("b"));
  });
};
function draw(layer) {
  var y = 10;
  layer.
     set({ font: "24pt Arial"                 }).text("24pt Arial", 10, y += 50).
     set({ font: "24pt 'Arial Black'"         }).text("24pt 'Arial Black'", 10, y += 50).
     set({ font: "24pt 'Comic Sans MS'"       }).text("24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "24pt 'Courier New'"         }).text("24pt 'Courier New'", 10, y += 50).
     set({ font: "24pt Georgia"               }).text("24pt Georgia", 10, y += 50).
     set({ font: "24pt 'Lucida Grande'"       }).text("24pt 'Lucida Grande'", 10, y += 50).
     set({ font: "24pt 'Lucida Sans Unicode'" }).text("24pt 'Lucida Sans Unicode'", 10, y += 50).
     set({ font: "24pt 'Times New Roman'"     }).text("24pt 'Times New Roman'", 10, y += 50).
     set({ font: "24pt 'Trebuchet MS'"        }).text("24pt 'Trebuchet MS'", 10, y += 50).
     set({ font: "24pt Verdana"               }).text("24pt Verdana", 10, y += 50).
     set({ font: "24pt 'MS UI Gothic'"        }).text("24pt 'MS UI Gothic'", 10, y += 50).
     set({ font: "24pt 'MS PGothic'"          }).text("24pt 'MS PGothic'", 10, y += 50).
     set({ font: "24pt 'Meiryo'"              }).text("24pt 'Meiryo'   [メイリオ]", 10, y += 50).
     set({ font: "24pt sans-serif"            }).text("24pt sans-serif", 10, y += 50).
     set({ font: "24pt serif"                 }).text("24pt serif", 10, y += 50).
     set({ font: "24pt monospace"             }).text("24pt monospace", 10, y += 50).
     set({ font: "24pt fantasy"               }).text("24pt fantasy", 10, y += 50).
     set({ font: "24pt cursive"               }).text("24pt cursive", 10, y += 50).
     set({ font: "24pt IPAMincho"             }).text("24pt IPAMincho", 10, y += 50).
     set({ font: "24pt IPAPMincho"            }).text("24pt IPAPMincho", 10, y += 50).
     set({ font: "24pt IPAGothic"             }).text("24pt IPAGothic", 10, y += 50).
     set({ font: "24pt IPAPGothic"            }).text("24pt IPAPGothic", 10, y += 50).
     set({ font: "24pt IPAUIGothic"           }).text("24pt IPAUIGothic", 10, y += 50).
     set({ font: "italic 24pt Arial"              }).text("italic 24pt Arial", 10, y += 50).
     set({ font: "italic 24pt 'Arial Black'"      }).text("italic 24pt 'Arial Black'", 10, y += 50).
     set({ font: "italic 24pt 'Comic Sans MS'"    }).text("italic 24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "italic 24pt 'Courier New'"      }).text("italic 24pt 'Courier New'", 10, y += 50).
     set({ font: "oblique 24pt Arial"             }).text("oblique 24pt Arial", 10, y += 50).
     set({ font: "oblique 24pt 'Arial Black'"     }).text("oblique 24pt 'Arial Black'", 10, y += 50).
     set({ font: "oblique 24pt 'Comic Sans MS'"   }).text("oblique 24pt 'Comic Sans MS'", 10, y += 50).
     set({ font: "oblique 24pt 'Courier New'"     }).text("oblique 24pt 'Courier New'", 10, y += 50).
     set({ font: "italic small-caps 24pt 'Lucida Grande'"       }).text("italic small-caps 24pt 'Lucida Grande'", 10, y += 50).
     set({ font: "italic normal bolder 24pt 'Lucida Sans Unicode'" }).text("italic normal bolder 24pt 'Lucida Sans Unicode'", 10, y += 50).
     set({ font: "italic normal bold 24pt 'Times New Roman'"    }).text("italic normal bold 24pt 'Times New Roman'", 10, y += 50).
     set({ font: "italic normal lighter 24pt 'Trebuchet MS'"    }).text("italic normal lighter 24pt 'Trebuchet MS'", 10, y += 50).
     set({ font: "normal normal 100 16pt Verdana"               }).text("normal normal 100 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 200 16pt Verdana"               }).text("normal normal 200 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 300 16pt Verdana"               }).text("normal normal 300 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 400 16pt Verdana"               }).text("normal normal 400 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 500 16pt Verdana"               }).text("normal normal 500 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 600 16pt Verdana"               }).text("normal normal 600 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 700 16pt Verdana"               }).text("normal normal 700 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 800 16pt Verdana"               }).text("normal normal 800 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 900 16pt Verdana"               }).text("normal normal 900 16pt Verdana", 10, y += 50).
     set({ font: "normal normal 400 xx-small Helvetica"         }).text("normal normal 400 xx-small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 x-small Helvetica"          }).text("normal normal 400 x-small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 small Helvetica"            }).text("normal normal 400 small Helvetica", 10, y += 50).
     set({ font: "normal normal 400 smaller Helvetica"          }).text("normal normal 400 smaller Helvetica", 10, y += 50).
     set({ font: "normal normal 400 medium Helvetica"           }).text("normal normal 400 medium Helvetica", 10, y += 50).
     set({ font: "normal normal 400 larger Helvetica"           }).text("normal normal 400 larger Helvetica", 10, y += 50).
     set({ font: "normal normal 400 large Helvetica"            }).text("normal normal 400 large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 x-large Helvetica"          }).text("normal normal 400 x-large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 xx-large Helvetica"         }).text("normal normal 400 xx-large Helvetica", 10, y += 50).
     set({ font: "normal normal 400 20px Helvetica"             }).text("normal normal 400 20px Helvetica", 10, y += 50).
     set({ font: "normal normal 400 18pt Helvetica"             }).text("normal normal 400 18pt Helvetica", 10, y += 50).
     set({ font: "normal normal 400 2em Helvetica"              }).text("normal normal 400 2em Helvetica", 10, y += 50).
     set({ font: "24pt 'HiraKakuPro-W3'"      }).text("24pt 'HiraKakuPro-W3'", 10, y += 50).
     set({ font: "24pt impact"                }).text("24pt impact", 10, y += 50).
     set({ font: "24pt hoge,'Meiryo'"         }).text("24pt hoge,'Meiryo'   [メイリオ]", 10, y += 50).
     set({ font: "24pt hoge,impact"           }).text("24pt hoge,impact", 10, y += 50).
     set({ font: "24pt Helvetica"             }).text('HTML ENTITY TEST. A&B&"C"', 10, y += 50).
     set({ font: "20px Helvetica"             }).text('20px Helvetica', 10, y += 50).
     set({ font: "10em Helvetica"             }).text('10em Helvetica', 10, y += 50);
}
      </pre>
    </div>
  </body>
</html>

